from rest_framework.pagination import PageNumberPagination

class ListPagination(PageNumberPagination):
    '''
    自定义分页
    '''
    page_size = 10  # 每页显示多少条
    page_size_query_param = 'PageSize'  # URL中每页显示条数的参数
    page_query_param = 'Page'    # URL中页码的参数
    max_page_size = None     # 最大页码数限制